
const path = require("path")
const sql = require("../module")
const huishou = {
}
//  views 页面
huishou.views = (req, res) => {
    res.sendFile(path.resolve(__dirname, "../views/huishou.html"))
}
// getdelete
huishou.getdelete = async (req, res) => {

    let str = 'SELECT   a.* ,b.`name` as classify  from novel as a LEFT  JOIN  novel_class as b on a.classify = b.id  WHERE a.isdelete = 1'
    let [data] = await sql.query(str)
    console.log(data);
    res.json({
        code: 2000,
        data: data
    })
}


module.exports = huishou